/* 请求接口API */
import AxiosRequest from './axios.js';

class ApiRequest {
  getTimeForYear(params, custom) {
    const url = 'api/statisbrand/getWeek';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  };
  getBrandDataList(params, custom){
    const url ='api/statisbrand/getList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  };
  getGoldidea(params, custom){
    const url ='admin/process/goldidea/h5Index';
    return AxiosRequest.get(url, params, custom);
    // return AxiosRequest.get(url, params, {
    //   noAuth: true,
    //   ...custom
    // });
  };
  getGoldideaDetail(params, custom){
    const url ='admin/process/goldidea/h5detail'; 
    return AxiosRequest.get(url, params, custom);
    // return AxiosRequest.get(url, params, {
    //   noAuth: true,
    //   ...custom
    // });
  }
  addGoldIdea(params, custom){
    const url ='admin/process/goldidea/h5add';
    return AxiosRequest.post(url, params, custom);
  };
  onUpload(params, custom){
    const url ='admin/ajax/upload'; 
    return AxiosRequest.post(url, params, custom);
  };

  getshoppingName(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/info';
    return AxiosRequest.post(url, params, custom);
  }
  getRankList(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/getData';
    return AxiosRequest.post(url, params, custom);
  }
  onSavePrice(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/save';
    return AxiosRequest.post(url, params, custom);
  }
  addRemark(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/updateStore';
    return AxiosRequest.post(url, params, custom);
  }
  //商场活动 获取活动内容 
  getActiveInfo(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/getActiveData';
    return AxiosRequest.post(url, params, custom);
  }

  //商场排名提交活动数据  
  onSaveActive(params, custom){
    const url = 'admin/storeranking/rankstoreperformance/saveActiveData';
    return AxiosRequest.post(url, params, custom);
  }

  getWxInfo(params, custom){
    const url = 'api/Jsjdk/getConfig';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  saveAgentConfigUrl(params, custom){ //获取当前路由提交到后台
    const url = 'api/Jsjdk/getAgentConfig';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getImgList(params, custom){
    const url = 'api/image/imageList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  getCategoryList(params, custom){
    const url = 'api/image/category';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getImgInfo(params, custom){
    const url = 'api/image/graphicDetail';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getMediaId(params, custom){//获取图片媒体id
    const url = 'api/image/getMediaId';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getAllCategory(params, custom){
    const url = 'api/image/allCategory';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getTagList(params, custom){//获取标签列表
    const url = 'api/image/tagList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  //品牌列表
  getBrandList(params, custom){
    const url = 'admin/performancereport/report/brandList';
    return AxiosRequest.post(url, params, custom);
  }
  //区域线下报表
  getDayReportByRegion(params, custom){
    const url = 'admin/performancereport/report/dayReport1';
    return AxiosRequest.post(url, params, custom);
  }

  //渠道线下报表
  getDayReportByChannel(params, custom){
    const url = 'admin/performancereport/report/dayReport2';
    return AxiosRequest.post(url, params, custom);
  }
  //获取预售的用户 
  getPresaleUser(params, custom){
    const url = 'admin/performancereport/presale/info';
    return AxiosRequest.get(url, params, custom);
  }

  //获取预售金额 
  getPresaleInfo(params, custom){
    const url = 'admin/performancereport/presale/getData';
    return AxiosRequest.get(url, params, custom);
  }
  //录入预售金额 
  getPresaleSave(params, custom){
    const url = 'admin/performancereport/presale/saveData';
    return AxiosRequest.post(url, params, custom);
  }

  //获取历史预售录入数据 
  getPresaleList(params, custom){
    const url = 'admin/performancereport/presale/getList';
    return AxiosRequest.get(url, params, custom);
  }
  //获取报表
  getReportData(params, custom){
    const url = 'api/statisbrand/getBrandList';
    return AxiosRequest.get(url, params, custom);
  }

  //判断品牌是否有区域 
  getBrandHasArea(params, custom){
    const url = 'admin/performancereport/report/getBrandHasArea';
    return AxiosRequest.post(url, params, custom);
  }
  //区域明细
  getAreaInfo(params, custom){
    const url = 'admin/performancereport/report/dayReport3';
    return AxiosRequest.post(url, params, custom);
  }
  //月份查询区域
  getReportByMonth(params, custom){
    const url = 'admin/performancereport/report/monthReport1';
    return AxiosRequest.get(url, params, custom);
  }
  //月份查询门店
  getReportDetailByMonth(params, custom){
    const url = 'admin/performancereport/report/monthReport3';
    return AxiosRequest.get(url, params, custom);
  }
  //分类汇总
  getClassifyTotal(params, custom){
    const url = 'admin/performancereport/channelreport/getchannelreport1';
    return AxiosRequest.get(url, params, custom);
  }
  //渠道表
  getChannelReport(params, custom){
    const url = 'admin/performancereport/channelreport/getChannelIndexReport';
    return AxiosRequest.get(url, params, custom);
  }
  getReportByYear(params, custom){
    const url = 'admin/performancereport/report/yearReport1';
    return AxiosRequest.get(url, params, custom);
  }
  getReportInfoByYear(params, custom){
    const url = 'admin/performancereport/report/yearReport3';
    return AxiosRequest.get(url, params, custom);
  }
  //IRO----------------
  getImgList2(params, custom){
    const url = 'api/image2/imageList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  getCategoryList2(params, custom){
    const url = 'api/image2/category';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getImgInfo2(params, custom){
    const url = 'api/image2/graphicDetail';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getMediaId2(params, custom){//获取图片媒体id
    const url = 'api/image2/getMediaId';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getTagList2(params, custom){//获取标签列表
    const url = 'api/image2/tagList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
   //IRO----------------
   //Laurel----------------
  getImgList3(params, custom){
    const url = 'api/image3/imageList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  getCategoryList3(params, custom){
    const url = 'api/image3/category';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getImgInfo3(params, custom){
    const url = 'api/image3/graphicDetail';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getMediaId3(params, custom){//获取图片媒体id
    const url = 'api/image3/getMediaId';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getTagList3(params, custom){//获取标签列表
    const url = 'api/image3/tagList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
   //Laurel----------------
   //sp-----------------------------
   getImgList4(params, custom){
    const url = 'api/image4/imageList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  getCategoryList4(params, custom){
    const url = 'api/image4/category';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getImgInfo4(params, custom){
    const url = 'api/image4/graphicDetail';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getMediaId4(params, custom){//获取图片媒体id
    const url = 'api/image4/getMediaId';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getTagList4(params, custom){//获取标签列表
    const url = 'api/image4/tagList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //sp-----------------------------
   //ed-----------------------------
   getImgList5(params, custom){
    const url = 'api/image5/imageList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  getCategoryList5(params, custom){
    const url = 'api/image5/category';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getImgInfo5(params, custom){
    const url = 'api/image5/graphicDetail';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }

  getMediaId5(params, custom){//获取图片媒体id
    const url = 'api/image5/getMediaId';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  
  getTagList5(params, custom){//获取标签列表
    const url = 'api/image5/tagList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //ed-----------------------------
 //nobis---------------------------
 getImgList6(params, custom){
  const url = 'api/image6/imageList';
  return AxiosRequest.get(url, params, {
    noAuth: true,
    ...custom
  });
}
getCategoryList6(params, custom){
  const url = 'api/image6/category';
  return AxiosRequest.get(url, params, {
    noAuth: true,
    ...custom
  });
}

getImgInfo6(params, custom){
  const url = 'api/image6/graphicDetail';
  return AxiosRequest.get(url, params, {
    noAuth: true,
    ...custom
  });
}

getMediaId6(params, custom){//获取图片媒体id
  const url = 'api/image6/getMediaId';
  return AxiosRequest.get(url, params, {
    noAuth: true,
    ...custom
  });
}

getTagList6(params, custom){//获取标签列表
  const url = 'api/image6/tagList';
  return AxiosRequest.get(url, params, {
    noAuth: true,
    ...custom
  });
}
 //nobis---------------------------

  //新-----集团报表接口
  getReportDataNew(params, custom){//获取品牌数据
    const url = 'api/statisbrand/getBrand';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //品牌渠道
  getChannelList(params, custom){//获取渠道列表
    const url = 'api/statisbrand/getChannelList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //区域
  getAreaList(params, custom){//获取区域列表
    const url = 'api/statisbrand/getAreaList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //店铺
  getStoreList(params, custom){//获取店铺列表
    const url = 'api/statisbrand/getShopList';
    return AxiosRequest.get(url, params, {
      noAuth: true,
      ...custom
    });
  }
  //新------集团报表接口 结束

  //新------金点子接口
  getIdeaList(params, custom){
    const url = 'admin/process/goldenidea/getList';
    return AxiosRequest.get(url, params, custom);
  }
  getIdeaDetail(params, custom){
    const url ='admin/process/goldenidea/detail'; 
    return AxiosRequest.get(url, params, custom);
    // return AxiosRequest.get(url, params, {
    //   noAuth: true,
    //   ...custom
    // });
  }
  goSaveIdea(params, custom){
    const url = 'admin/process/goldenidea/submit';
    return AxiosRequest.get(url, params, custom);
  }

  //pdm 
  //产品线
  getProductline(params, custom){
    const url = 'admin/pdm/api/getUserInfo';
    return AxiosRequest.get(url, params, custom);
  }
  //提交 
  goAddFas(params, custom){
    const url = 'admin/pdm/api/addFas';
    return AxiosRequest.get(url, params, custom);
  }
  //建款列表 
  getMyFasDataList(params, custom){
    const url = 'admin/pdm/api/getMyFasDataList';
    return AxiosRequest.get(url, params, custom);
  }
  // 编辑建款
  goEditFas(params, custom){
    const url = 'admin/pdm/api/editFas';
    return AxiosRequest.get(url, params, custom);
  }
  //审批列表
  getApprovalList(params, custom){
    const url = 'admin/pdm/api/getApprovalList';
    return AxiosRequest.get(url, params, custom);
  }
  //审批详情 
  goApprovalDetail(params, custom){
    const url = 'admin/pdm/api/operateDetail';
    return AxiosRequest.get(url, params, custom);
  }
  //提交审批
  goOperateApproval(params, custom){
    const url = 'admin/pdm/api/operateApproval';
    return AxiosRequest.get(url, params, custom);
  }
  //MBTI 测评
  getAuthTombti(params, custom){//获取测评权限
    const url = 'admin/tools/mbti_api/auth';
    return AxiosRequest.get(url, params, custom);
  }
  getProblemList(params, custom){//问题列表
    const url = 'admin/tools/mbti_api/option';
    return AxiosRequest.get(url, params, custom);
  }
  getStaffList(params, custom){//员工列表
    const url = 'admin/tools/mbti_api/list';
    return AxiosRequest.get(url, params, custom);
  }
  goSaveSub(params, custom){//保存问题
    const url = 'admin/tools/mbti_api/submit';
    return AxiosRequest.post(url, params, custom);
  }
  getResultmbti(params, custom){
    const url = 'admin/tools/mbti_api/answer';
    return AxiosRequest.get(url, params, custom);
  }
  getPostList(params, custom){//获取职位列表
    const url = 'admin/tools/mbti_api/position';
    return AxiosRequest.get(url, params, custom);
  }
  savePostSubmit(params, custom){//保存提交的职位
    const url = 'admin/tools/mbti_api/positionSubmit';
    return AxiosRequest.get(url, params, custom);
  }
  // 资料列表
  getArticlelist(params, custom){
    const url = 'admin/sustainable/article/getList';
    return AxiosRequest.get(url, params, custom);
  }

  getArticleDetail(params, custom){
    const url = 'admin/sustainable/article/detail';
    return AxiosRequest.get(url, params, custom);
  }

  getCategoryBySustainable(params, custom){
    const url = 'admin/sustainable/category/getList';
    return AxiosRequest.get(url, params, custom);
  }
}

export default new ApiRequest();